<template>
	<div>

		<el-dialog id="3"  title="表头场景选择" :visible.sync="dialogVisible" width="1000px">
			<div>
                <el-radio v-model="radio" label="1">
                    场景一
                </el-radio>
                <div style="margin: 10px 0;">
                   <alarmStaticOne></alarmStaticOne>
                </div>
            </div>
			<div>
			    <el-radio v-model="radio" label="2">
			        场景二
			    </el-radio>
			    <div style="margin: 10px 0;">
			       <alarmStaticTwo></alarmStaticTwo>
			    </div>
			</div>
            <div>
                <el-radio v-model="radio" label="3">
                    场景三
                </el-radio>
                <div style="margin: 10px 0;">
                   <alarmStaticThree></alarmStaticThree>
                </div>
            </div>
            <div>
                <el-radio v-model="radio" label="4">
                    场景四
                </el-radio>
                <div style="margin: 10px 0;">
                   <alarmStaticOne></alarmStaticOne>
                </div>
            </div>
			<div slot="footer" class="dialog-footer" style="text-align:center">
				<el-button type="primary" @click="doSaveTime" title="保存">确认</el-button>
				<el-button @click="dialogVisible = false" title="取消">取消</el-button>
			</div>
		</el-dialog>

	</div>
</template>

<script>
import alarmStaticOne from './alarmStaticOne.vue';
import alarmStaticTwo from './alarmStaticTwo.vue';
import alarmStaticThree from './alarmStaticThree.vue';
	export default {
		components: {
alarmStaticOne,
alarmStaticTwo,
alarmStaticThree
		},
		watch: {
			params: {
				immediate: true,
				deep:true,
				handler(val) {
                    console.log(val)
					if (val) {
						this.dialogVisible = true;
					}
				}
			},

			dialogVisible: {
				immediate: true,
				handler(val) {
					if (!val) this.params = '';
				}
			}

		},
		data() {
			return {
				params: "",
				radio:"1",

				dialogVisible: false,
				title: "",

			}
		},
		created() {

		},
		methods: {


			doSaveTime() {
                this.$emit("changeSelect",this.radio)
                this.dialogVisible=false

			},
		}
	}
</script>

<style>
</style>
